package com.heima.api.fallback;

import com.heima.api.ApArticleSaveFeign;
import com.heima.article.dotos.ApArticleSaveDto;
import com.heima.user.model.common.dtos.ResponseResult;
import com.heima.user.model.common.enums.AppHttpCodeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ApArticleSaveFeignBack implements ApArticleSaveFeign {


    @Override
    public ResponseResult save(ApArticleSaveDto dto) {
        log.error("服务异常,降级逻辑");

        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR);
    }
}
